require(["config"], function(config) {
	require(["jquery", "sw", "ck"], function(jq, sw, cookie) {
		var zh = jq.cookie("zhanghao");
		var mm = jq.cookie("mima")
		var boolean01 = false;
		var boolean02 = false;
		jq("#dl_password").blur(function() {
				if((jq("#dl_account").val()) == zh) {
					boolean01 = true;
					console.log(12)
				}
				if((jq("#dl_password").val()) == mm) {
					boolean02 = true;
					console.log(1)
				}

			})
			/**************登录***************/
		jq("#dl").click(function() {
			if(boolean01 && boolean02) {
				window.location = "index.html";
				jq(".remind").hide();
			} else {
				jq(".remind").show();
			}

		})

		/**********记住账号*********************/
		jq.cookie("register", "false", {
			path: "/",
			expires: 0
		})
		jq("#dl").click(function() {
			if(jq("#check").is(":checked")) {
				jq.cookie("check", "true", {
					path: "/",
					expires: 7
				})

				jq.cookie("register", "true", {
					path: "/",
					expires: 7
				})
			} else {
				jq.cookie("check", "false", {
					path: "/",
					expires: 0
				})

				jq.cookie("register", "false", {
					path: "/",
					expires: 0
				})
			}

		})

		$(document).ready(function() {
			if(jq.cookie("check") == "true") {
				jq("#check").attr("checked", true);
				jq("#dl_account").val(zh);
				console.log(123123)
			}
		});

	});
})